import { create } from 'zustand'
import { immer } from 'zustand/middleware/immer' // 引入中间件
type CompareState = {
  compare: boolean,
  setCompare: (status: boolean) => void
}

export const useCompareStore = create<CompareState>()(immer((set) => ({
  compare: false,
  setCompare: (status) => set((state) => { state.compare = status }),
})),
)